package ch1;

import java.util.ArrayList;

import tankbullets.Bullet;
import tankbullets.EnemyBullet;
import tool.ImageTool;

public class Home extends Tank{
	static ArrayList<Integer> HomeXY=new ArrayList<Integer>();
	private int life;
	public Home(){
		x = 460;
		y = 550;
		life = 2;
		this.homeImage = ImageTool.home;
		this.ember = ImageTool.beeBlast;
		width = homeImage.getWidth();
		height = homeImage.getHeight();
		HomeXY.add(x);
		HomeXY.add(y);
	}
	public boolean shootBy(Bullet b) {
		if(super.shootBy(b)){
			life--;
			System.out.println(life);
		}
		return life==0;
	}
	public boolean shootHBy(EnemyBullet b) {
		if(super.shootHBy(b)){
			life--;
		}
		return life==0;
	}
	@Override
	public boolean outOfBounds() {
		return false;
	}
	@Override
	public void step() {}
	public int getLife() {
		return life;
	}
}
